home *** CD-ROM | disk | FTP | other *** search
/ Super PC 33 / Super PC 33 (Shareware).iso / spc / sonido / timidity / source / makefile < prev    next >
Encoding:
Makefile  |  1995-08-03  |  6.5 KB  |  245 lines

  1. # TiMidity -- Experimental MIDI to WAVE converter
  2. # Copyright (C) 1995 Tuukka Toivonen <titoivon@snakemail.hut.fi>
  3. # This program is free software; you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation; either version 2 of the License, or
  6. # (at your option) any later version.
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10. # GNU General Public License for more details.
  11. # You should have received a copy of the GNU General Public License
  12. # along with this program; if not, write to the Free Software
  13. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  14.  
  15. ########### Installation options
  16.  
  17. # Where to install the executable
  18. BIN_DIR = /usr/local/bin
  19.  
  20. # Where to install the manual page
  21. MAN_DIR = /usr/local/man/man1
  22. MAN_EXTENSION = 1
  23.  
  24. # Where to install the patches, config files, and MIDI files.
  25. # If you change this, it's a good idea to recompile the binary,
  26. # or you'll need to invoke timidity with the -L option.
  27. TIMID_DIR = /usr/local/lib/timidity
  28.  
  29. ########### Compilation options -- there are more in config.h.  
  30. #
  31. # Uncomment the lines you need. You may need to change include/library
  32. # paths etc.
  33.  
  34. ########### Audio device selection
  35. #
  36. # Select one only. If your make doesn't understand +=, you may have to
  37. # do some axe work.
  38.  
  39. # Select the Linux/FreeBSD audio driver
  40. SYSTEM += -DAU_LINUX
  41. SYSEXTRAS += linux_audio.c
  42. #EXTRAINCS +=
  43. #EXTRALIBS += 
  44.  
  45. ## Select the HP-UX network audio server
  46. #SYSTEM += -DHPUX -DAU_HPUX
  47. #SYSEXTRAS += hpux_audio.c
  48. #EXTRAINCS +=
  49. #EXTRALIBS += -lAlib
  50.  
  51. ## Select the Sun audio driver
  52. #SYSTEM += -DSUN -D__USE_GNU -DAU_SUN
  53. #SYSEXTRAS += sun_audio.c
  54. #EXTRAINCS += -I/usr/demo/SOUND
  55. #EXTRALIBS += -L/usr/demo/SOUND -laudio
  56.  
  57. ########### Used interface selection
  58. #
  59. # You can select either, neither, or even both :)
  60.  
  61. # Select the ncurses full-screen interface
  62. SYSTEM += -DIA_NCURSES
  63. SYSEXTRAS += ncurses_ctl.c
  64. EXTRAINCS += -I/usr/include/ncurses
  65. EXTRALIBS += -lncurses
  66.  
  67. ## Select the S-Lang full-screen interface
  68. #SYSTEM += -DIA_SLANG
  69. #SYSEXTRAS += slang_ctl.c
  70. #EXTRAINCS += -I/usr/include/slang
  71. #EXTRALIBS += -lslang
  72.  
  73. ########### Other
  74. #
  75.  
  76. ## Uncomment this to compile on an unknown little-endian machine
  77. #SYSTEM += -DLITTLE_ENDIAN
  78.  
  79. ########### Compiler and flags.
  80. #
  81. # igcc (gcc with Intel optimization hack) is recommended for Intel chips.
  82.  
  83. CC = gcc
  84. DEBUGFLAGS = -Wall -O2
  85.  
  86. #CC = igcc
  87. #DEBUGFLAGS = -Wall -O4 -mpentium
  88.  
  89. ########### Now check out the options in config.h
  90.  
  91. #########################################################################
  92. # You shouldn't need to change anything beyond this line
  93.  
  94. VERSION = 0.2g
  95. SUPPVERSION = 0.1
  96.  
  97. PROJ = timidity
  98. DIST = timidity-$(VERSION).tar.gz
  99. SDIST = timidity-lib-$(SUPPVERSION).tar.gz
  100.  
  101. CFLAGS= $(DEBUGFLAGS) -DDEFAULT_PATH=\"$(TIMID_DIR)\" \
  102.     -DTIMID_VERSION=\"$(VERSION)\" $(SYSTEM) $(EXTRAINCS)
  103.  
  104. ########### All relevant files
  105.  
  106. # Sources needed for every installation
  107. CSRCS = timidity.c common.c readmidi.c playmidi.c resample.c mix.c instruments.c \
  108.     tables.c controls.c output.c filtering.c \
  109.     wave_audio.c raw_audio.c dumb_ctl.c
  110.  
  111. # Optional installation-specific sources
  112. OPTSRCS = hpux_audio.c linux_audio.c sun_audio.c ncurses_ctl.c slang_ctl.c
  113.  
  114. # External utility sources
  115. TOOLSRCS = bag.c wav2pat.c
  116.  
  117. # All headers
  118. CHDRS = config.h common.h readmidi.h playmidi.h resample.h mix.h instruments.h \
  119.     tables.h controls.h output.h filtering.h
  120.  
  121. # These get printed out by "make listing"
  122. ALLSRCS = $(CSRCS) $(OPTSRCS) $(CHDRS) $(TOOLSRCS) Makefile .depend
  123.  
  124. MANPAGE = timidity.man
  125. DOCS = README COPYING INSTALL CHANGES TODO FAQ $(MANPAGE)
  126. CONFIGF = timidity.cfg gsdrum.cfg gravis.cfg midia.cfg wowpats.cfg mt32.cfg
  127.  
  128. PATCHF = patch/acpiano.pat patch/nylongt2.pat
  129. SAMPLEF = midi/cavatina.mid midi/impromptu.mid midi/malaguena.mid \
  130.       midi/test-decay.mid midi/test-panning.mid midi/test-scale.mid
  131.  
  132. # These get stuffed in the distribution archive
  133. ALLDIST = $(DOCS) $(ALLSRCS) $(CONFIGF)
  134.  
  135. # These go in the support archive
  136. SUPPDIST = $(PATCHF) $(SAMPLEF) README-lib
  137.  
  138. ########### Rules
  139.  
  140. COBJS = $(CSRCS:.c=.o) $(SYSEXTRAS:.c=.o)
  141.  
  142. TOOLS = $(TOOLSRCS:.c=)
  143.  
  144. all: $(PROJ) $(TOOLS)
  145.  
  146. clean:
  147.     rm -f $(COBJS) core
  148.  
  149. spotless: clean
  150.     rm -f $(PROJ) $(TOOLS) $(DIST) $(SDIST) \
  151.         $(DIST).CONTENTS $(SDIST).CONTENTS
  152.  
  153. .c.o:
  154.     $(CC) $(CFLAGS) -c $<
  155.  
  156. $(PROJ): $(COBJS)
  157.     $(CC) $(CFLAGS) -o $(PROJ) $(COBJS) $(EXTRALIBS) -lm
  158.  
  159. bag: bag.c
  160.     $(CC) $(CFLAGS) -o bag bag.c
  161.  
  162. wav2pat: wav2pat.c
  163.     $(CC) $(CFLAGS) -o wav2pat wav2pat.c
  164.  
  165. .depend dep:
  166.     $(CC) $(CFLAGS) -MM $(CSRCS) $(OPTSRCS) $(TOOLSRCS) > .depend
  167.  
  168. include .depend
  169.  
  170. ########### Installation targets
  171.  
  172. install:
  173.     @echo
  174.     @echo Please enter one of the commands below:
  175.     @echo 
  176.     @echo \"make install.bin\" - Install the executable in $(BIN_DIR).
  177.     @echo \"make install.man\" - Install the manual page in $(MAN_DIR).
  178.     @echo \"make install.lib\" - Install the library files in $(TIMID_DIR).
  179.     @echo \"make install.all\" - All of the above.
  180.     @echo
  181.  
  182. install.all: install.bin install.man install.lib
  183.  
  184. # install.bin: $(PROJ) Dumb make thinks it has to have $(COBJS) to install...
  185. install.bin:
  186.     mkdir -p $(BIN_DIR)
  187.     install -s -m 755 $(PROJ) $(TOOLS) $(BIN_DIR)
  188.  
  189. install.man:
  190.     mkdir -p $(MAN_DIR)
  191.     install -m 644 $(MANPAGE) $(MAN_DIR)/$(PROJ).$(MAN_EXTENSION)
  192.  
  193. install.lib: install.config install.patch
  194.  
  195. install.config: $(CONFIGF)
  196.     mkdir -p $(TIMID_DIR)
  197.     install -m 644 $(CONFIGF) $(TIMID_DIR)
  198.  
  199. install.patch: $(PATCHF)
  200.     mkdir -p $(TIMID_DIR)/patch
  201.     install -m 644 $(PATCHF) $(TIMID_DIR)/patch
  202.  
  203. ########## Some special targets
  204.  
  205. time:
  206.     time ./$(PROJ) -idq -s32 -p32 -Or -o/dev/null \
  207.     -c /usr/local/lib/timidity/timidity.cfg \
  208.     $(HOME)/midi/jazz/jzdwing.mid.gz
  209.  
  210. listing.ps: $(ALLSRCS)
  211.     a2ps -2 -nP -c $(ALLSRCS) >listing.ps
  212.  
  213. listing: listing.ps
  214.  
  215. dist: $(DIST)
  216.  
  217. sdist: $(SDIST)
  218.  
  219. putup: $(DIST)
  220.     changes2html < CHANGES > changes.html
  221.     faq2html < FAQ > faq.html
  222.     groff -man -Tlatin1 -P-b -P-u $(MANPAGE) > timidity.txt
  223.     cp /home/titoivon/public_html/timidity/index.html index.html
  224.     tar czvf /home/titoivon/putup.tgz $(DIST) $(DIST).CONTENTS \
  225.         changes.html faq.html timidity.txt index.html \
  226.         INSTALL COPYING
  227.     rm changes.html faq.html timidity.txt index.html
  228.  
  229. $(DIST): $(ALLDIST)
  230.     cd ..; tar czf $(DIST) $(patsubst %,timidity/%,$(ALLDIST)) &&\
  231.     mv $(DIST) timidity
  232.     tar tzvf $(DIST) >$(DIST).CONTENTS
  233.  
  234. $(SDIST): $(SUPPDIST)
  235.     cd ..; tar czf $(SDIST) $(patsubst %,timidity/%,$(SUPPDIST)) &&\
  236.     mv $(SDIST) timidity
  237.     tar tzvf $(SDIST) >$(SDIST).CONTENTS
  238.  
  239. ########## End of Makefile
  240.